#ifndef PROJECTTREEWIDGET_H
#define PROJECTTREEWIDGET_H

#include "ui_projecttreewidget.h"
#include <QtGui/QWidget>
#include <QTreeWidgetItem>

/*!

BlackRabbit - OpenSource IDE.
@author Edward Sarkisyan (edward.sarkisyan@gmail.com)
Use LGPL (http://www.gnu.org/copyleft/lesser.html)

*/

namespace Ui {
    class ProjectTreeWidget;
}

class ProjectTreeWidget : public QWidget {
    Q_OBJECT
public:
    ProjectTreeWidget(QWidget *parent = 0, QString fileName= QString());
    void setProjectFile(QString fileName);
    ~ProjectTreeWidget();
    QTreeWidget* treeWidget();
    bool setTabsContainer(QTabWidget* container);

protected:
    void changeEvent(QEvent *e);

private:
    void addNewTo(QTreeWidgetItem* parent = 0, QString fileName = QString());
    Ui::ProjectTreeWidget *m_ui;
    QTabWidget *m_tabsContainer;

private slots:
    void on_addFileBttn_clicked();
    void on_newFileButton_clicked();
    void on_treeWidget_itemDoubleClicked(QTreeWidgetItem* item, int column);
};

#endif // PROJECTTREEWIDGET_H
